package com.visualize.demo.repository;

import com.visualize.demo.model.Project;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import java.util.Date;
import java.util.List;

public interface ProjectRepository extends CrudRepository<Project, Integer> {
    @Query(value = "select * From #{#entityName}", nativeQuery = true)
    List<Project> getProjectList();

    @Query(value = "select * From #{#entityName} where id = :id", nativeQuery = true)
    Project getProjectById(@Param("id") Integer id);
}
